<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 cgi_center.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
$page_title = "CGI Center";
include $root_path.'common.php';
include $root_path.'page_header.php';

$template->set_filenames(array(
	'body' => $root_path.$template_path.'scripts/cgi_center.tpl')
);


$switch_scgiwrap = <<<EOFpacman
<cpanelfeature scgiwrap>test</cpanelfeature>
EOFpacman;

if (!empty($switch_scgiwrap)) {
	$template->assign_block_vars('switch_scgiwrap', array());
}

$scgiwrap_url = <<<EOFpacman
<cpanel print="$homedir/public_html/scgi-bin">
EOFpacman;

$switch_randhtml = <<<EOFpacman
<cpanelfeature randhtml>test</cpanelfeature>
EOFpacman;

if (!empty($switch_randhtml)) {
	$template->assign_block_vars('switch_randhtml', array());
}

$randomhtml_url = <<<EOFpacman
<cpanel Cgi="randhtmllink()">
EOFpacman;

$switch_guest = <<<EOFpacman
<cpanelfeature guest>test</cpanelfeature>
EOFpacman;

if (!empty($switch_guest)) {
	$template->assign_block_vars('switch_guest', array());
}

$switch_counter = <<<EOFpacman
<cpanelfeature counter>test</cpanelfeature>
EOFpacman;

if (!empty($switch_counter)) {
	$template->assign_block_vars('switch_counter', array());
}

$switch_clock = <<<EOFpacman
<cpanelfeature clock>test</cpanelfeature>
EOFpacman;

if (!empty($switch_clock)) {
	$template->assign_block_vars('switch_clock', array());
}

$switch_countdown = <<<EOFpacman
<cpanelfeature countdown>test</cpanelfeature>
EOFpacman;

if (!empty($switch_countdown)) {
	$template->assign_block_vars('switch_countdown', array());
}

$switch_emailscripts = <<<EOFpacman
<cpanelfeature emailscripts>test</cpanelfeature>
EOFpacman;

if (!empty($switch_emailscripts)) {
	$template->assign_block_vars('switch_emailscripts', array());
}

$switch_formmail = <<<EOFpacman
<cpanelif !$CONF{'skipformmail'}>test</cpanelif>
EOFpacman;

if (!empty($switch_formmail)) {
	$template->assign_block_vars('switch_formmail', array());
}

$switch_entropysearch = <<<EOFpacman
<cpanelfeature entropysearch>test</cpanelfeature>
EOFpacman;

if (!empty($switch_entropysearch)) {
	$template->assign_block_vars('switch_entropysearch', array());
}

$switch_entropybanner = <<<EOFpacman
<cpanelfeature entropybanner>test</cpanelfeature>
EOFpacman;

if (!empty($switch_entropybanner)) {
	$template->assign_block_vars('switch_entropybanner', array());
}


$u_cgi_email = <<<EOFpacman
http://<cpanel print="DOMAIN">/cgi-bin/cgiemail
EOFpacman;

$guestbook_comment_code = <<<EOFpacman
&lt;form action="/cgi-sys/guestbook.cgi" target=guestwindow&gt;<br />
&lt;input type="hidden" name="user" value="<cpanel print="$ENV{'REMOTE_USER'}">"&gt;<br />
&lt;input type="hidden" name="action" value="addguest"&gt;<br />
&lt;input type="hidden" name="basehref" value="http://<cpanel print="DOMAIN">"&gt;<br />
&lt;input type="hidden" name="template" value="default"&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;Name:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="name"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;Email:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="email"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;Url:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="url"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;Comments:&lt;/td&gt;&lt;td&gt;&lt;textarea name="comments"&gt;&lt;/textarea&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td colspan=2&gt;&lt;input type="submit" value="Sign Guestbook"&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;
EOFpacman;

$u_guestbook_view = <<<EOFpacman
http://<cpanel print="DOMAIN">/cgi-sys/guestbook.cgi?action=listguests&user=<cpanel print="$ENV{'REMOTE_USER'}">
EOFpacman;

$u_guestbook_manage = <<<EOFpacman
/cgi-sys/guestbook.cgi?action=listguests&user=<cpanel print="$ENV{'REMOTE_USER'}">
EOFpacman;

$template->assign_vars(array(
	'GUESTBOOK_COMMENT_CODE' => $guestbook_comment_code,
	'U_SIMPLE_GUESTBOOK_SETUP' => 'cgi_center_guestbook_setup_done.php',
	'U_SIMPLE_GUESTBOOK_VIEW' => $u_guestbook_view,
	'U_SIMPLE_GUESTBOOK_MANAGE' => $u_guestbook_manage,
	'U_SIMPLE_GUESTBOOK_TEMPLATE' => 'cgi_center_guestbook_edit.php',

	'SCGIWRAP_URL' => $scgiwrap_url,
	'U_SCGIWRAP_SETUP' => 'cgi_center_scgiwrap_setup_done.php',
	'RANDOMHTML_URL' => $randomhtml_url,
	'U_RANDHTML_SETUP' => 'cgi_center_randomhtml_setup.php',
	'U_COUNTER_SETUP' => 'cgi_center_counter_setup.php',
	'U_COUNTER_STYLES' => 'cgi_center_counter_preview.php',
	'U_COUNTER_EDIT' => 'cgi_center_counter_edit.php',
	'U_CLOCK' => 'cgi_center_clock.php',
	'U_COUNTDOWN' => 'cgi_center_countdown.php',
	'U_EMAILSCRIPTS' => 'cgi_center_cgi_email_done.php',
	'U_CGI_EMAIL' => $u_cgi_email,
	'U_FORMMAIL' => 'cgi_center_formmail.php',
	'U_ENTROPYSEARCH' => 'cgi_center_entropysearch.php',
	'U_ENTROPYBANNER' => 'cgi_center_entropybanner.php',
	)
);


//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>